<!DOCTYPE html>

<!-- Most stuff from http://html5boilerplate.com/ -->

<!--[if lt IE 7]><html id="<?php echo $html_id ?>" class="no-js ie6 oldie<?php foreach ($html_classes as $class) echo " $class" ?>" lang="<?php echo SleekPHP::currentLang() ?>"><![endif]-->
<!--[if IE 7]><html id="<?php echo $html_id ?>" class="no-js ie7 oldie<?php foreach ($html_classes as $class) echo " $class" ?>" lang="<?php echo SleekPHP::currentLang() ?>"><![endif]-->
<!--[if IE 8]><html id="<?php echo $html_id ?>" class="no-js ie8 oldie<?php foreach ($html_classes as $class) echo " $class" ?>" lang="<?php echo SleekPHP::currentLang() ?>"><![endif]-->
<!--[if gt IE 8]><!--><html id="<?php echo $html_id ?>" class="no-js<?php foreach ($html_classes as $class) echo " $class" ?>" lang="<?php echo SleekPHP::currentLang() ?>"><!--<![endif]-->

	<head>

		<meta charset="UTF-8"/>

		<title><?php echo htmlspecialchars($html_title); ?></title>

		<meta name="author" content="<?php echo htmlspecialchars($meta_author) ?>"/>
		<meta name="copyright" content="<?php echo htmlspecialchars($meta_copyright) ?>"/>
		<meta name="keywords" content="<?php echo htmlspecialchars($meta_keywords) ?>"/>
		<meta name="description" content="<?php echo htmlspecialchars($meta_description) ?>"/>
		<meta name="robots" content="<?php echo $meta_robots; ?>"/>

		<?php if ($mobile_style_support) : ?>
			<meta name="viewport" content="width=device-width,initial-scale=1"/>
		<?php endif ?>

		<meta http-equiv="imagetoolbar" content="false"/>

		<?php if ($canonical_url) : ?>
			<link rel="canonical" href="<?php echo $canonical_url ?>"/>
		<?php endif ?>

		<?php if ($css) : ?>
			<?php echo $ie_support['condition_open'] ?>
				<link rel="stylesheet" href="<?php echo $css ?>"/>
			<?php echo $ie_support['condition_close'] ?>
		<?php endif ?>

		<?php if ($ie_support['support'] !== true) : ?>
			<?php echo $ie_support['fallback_condition_open'] ?>
				<link rel="stylesheet" href="<?php echo $ie_support['fallback_style'] ?>"/>
			<?php echo $ie_support['fallback_condition_close'] ?>
		<?php endif ?>

		<?php if ($js_head) : ?>
			<?php echo $ie_support['js_condition_open'] ?>
				<script src="<?php echo $js_head ?>"></script>
			<?php echo $ie_support['js_condition_close'] ?>
		<?php endif ?>

		<!--[if lt IE 9]>
			<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
		<![endif]-->

		<script>
			var html = document.getElementsByTagName('html')[0];

			html.className = html.className.replace('no-js', 'js');
		</script>

	</head>

	<body>

		<?php echo $child_modules ?>

		<?php if ($js_foot or $js_inline) : ?>
			<?php echo $ie_support['js_condition_open'] ?>
				<?php if ($js_foot) : ?>
					<script src="<?php echo $js_foot ?>"></script>
				<?php endif ?>

				<?php if ($js_inline) : ?>
					<script><?php echo $js_inline ?></script>
				<?php endif ?>

				<script>
					SleekPHP.WEBROOT		= '<?php echo WEBROOT ?>';
					SleekPHP.DEFAULT_LANG	= '<?php echo conf('lang.default_lang') ?>';
					SleekPHP.CURRENT_LANG	= '<?php echo SleekPHP::currentLang() ?>';
					SleekPHP.MOD_REWRITE	= <?php echo MOD_REWRITE ? 'true' : 'false' ?>;
				</script>
			<?php echo $ie_support['js_condition_close'] ?>
		<?php endif ?>

		<?php echo $ie_support['fallback_condition_open'] ?>
			<script src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
			<script>window.attachEvent('onload', function () { CFInstall.check({mode:'overlay'}) })</script>
		<?php echo $ie_support['fallback_condition_close'] ?>

	</body>

</html>
